package com.atguigu.eduservice.controller;

import com.atguigu.commonutils.ResultInfo;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

/**
 * ClassName:EduLoginController
 * Package:com.atguigu.eduservice.controller
 * Description:
 *
 * @Date:2021/1/8 14:57
 * @Author:hm
 */

@RestController
@RequestMapping("/eduservice/user")
public class EduLoginController {

    //用户登录
    @PostMapping("/login")
    public ResultInfo login(){

        return ResultInfo.ok().data("token","admin");
    }

    //获取信息
    @GetMapping("/info")
    public ResultInfo info(){
        return ResultInfo.ok().data("roles","[admin]").data("name","admin").data("avatar","https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif");
    }
}
